<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<title>嗨扑米——帮你想帮！</title>
	<script type="text/javascript" src="js/uploadPreview.js"></script>
	<link href="css/global.css" rel="stylesheet" type="text/css">
	<link href="css/index.css" rel="stylesheet" type="text/css">
	<link rel="icon" href="images/haipumi.ico"/> 
	<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
	<script type="text/javascript" src="js/yhj_index.js"></script>
	<link href="css/lk_img_preview.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/ajaxfileupload.js"></script>
	<script src="js/lk_img_preview.js"></script>
	<link href="css/lk_select_background.css" rel="stylesheet" type="text/css" />
	<script src="js/lk_select_background.js"></script>
	<link href="css/lk_cool_effects.css" rel="stylesheet" type="text/css" />	
	<script src="js/lk_cool_effects.js"></script>
	<link rel="stylesheet" href="css/sweet-alert.css"/>
	<script src="js/sweet-alert.min.js" type="text/javascript"></script>
	<script src="js/chat.js"></script>
	<script>
		 function checkskin(){
				//alert("${sessionScope.userinfosession.simage}");
				if('${sessionScope.userinfosession.simage}'==''||'${sessionScope.userinfosession.simage}'=='undefinde'){
					return false;
				}else{
				//alert("有人登录，有背景");
					return true;
				}
			}
		var flag= checkskin();
	</script>
  </head>
  
  <body>
  	<div class="yhj_body_zindex">
        <!--头部内容开始 -->
        <iframe class="yhj_head" src="head.jsp"></iframe>
        <!--头部内容结束-->
        
        <!--快速注册-->
        <div class="yhj_quickregister_0"></div><!--只是用来占位的-->
        <div class="yhj_quickregister" id="yhj_quickregister" >
            <div class="yhj_quickregister_content">
                <div class="yhj_quickregister_content_left">
                    <img src="images/yhj_1440901217_784634.png" class="yhj_quickregister_content_left_img1"/>
                    <a class="yhj_quickregister_content_left_phone" href="#">[手机号注册]</a><br>
                    <form action="" method="post" class="yhj_userrigister">
                        <input type="text" name="yhj_userrigister_uname" id="yhj_userrigister_uname" placeholder="邮箱注册新账号" style="margin-left:10px;margin-right:50px;"/>
                        <input type="password" name="yhj_userrigister_pwd" id="yhj_userrigister_pwd" placeholder="为账号设置密码" style="margin-right:50px;"/>
                        <p class="yhj_a_demo_four" style="width:80px;" onClick="register()"><font style="font-size:16px;margin-left:30px;position:relative;top:-5px;">注册</font></p>
                        
                    </form> 
                </div>
                <div class="yhj_quickregister_content_right">
                    <img src="images/yhj_20150901105929.png" width="130" height="50"><br>
                    <a href="Login.jsp">[嗨扑米账号登陆]</a>
                </div>
            </div>
        </div>
        <!--快速注册结束-->
        <!-- 中间内容开始 -->
        <div class="yhj_content_zindex">
        <!--更改背景的块-->
        <div id="lk_select_bgDiv_zindex">
            <div id="lk_select_buttom" style="display:none;" ></div>
            <div id="lk_select_bgDiv">
                <div class="lk_select_bgDiv_top">
                    <ul>
                        <li style="background:#000">经 典</li>
                        <li>季 节</li>
                        <li>人 物</li>
                        <li>小清新</li>
                    </ul>
                    <span class="lk_select_bgDiv_del">×</span>
                </div>
                <div class="lk_select_bgDiv_down">
                    <div class="lk_select_bgDiv_down_smallBg">
                        <c:forEach items="${applicationskinlist.jdList}" varStatus="i" var="item" >
							<div class="lk_select_bgDiv_down_smallBg_img" yhj_sid="${item.sid }"><img src="images/background/${item.simage }"/></div>
						</c:forEach>
                    </div>
                    <div class="lk_select_bgDiv_down_smallBg">
                        <c:forEach items="${applicationskinlist.jjList}" varStatus="i" var="item" >
							<div class="lk_select_bgDiv_down_smallBg_img" yhj_sid="${item.sid }"><img src="images/background/${item.simage }"/></div>
						</c:forEach>
                    </div>
                    <div class="lk_select_bgDiv_down_smallBg">
                        <c:forEach items="${applicationskinlist.rwList}" varStatus="i" var="item" >
							<div class="lk_select_bgDiv_down_smallBg_img" yhj_sid="${item.sid }"><img src="images/background/${item.simage }"/></div>
						</c:forEach>
                    </div>
                    
                    <div class="lk_select_bgDiv_down_smallBg">
                        <c:forEach items="${applicationskinlist.xqxList}" varStatus="i" var="item" >
							<div class="lk_select_bgDiv_down_smallBg_img" yhj_sid="${item.sid }"><img src="images/background/${item.simage }"/></div>
						</c:forEach>
                    </div>
                    <div class="lk_select_bgDiv_down_buttom">
                        <input type="button" value="确定" id="lk_select_bgDiv_down_buttom_1"/>
                        <input type="button" value="取消" id="lk_select_bgDiv_down_buttom_2"/>
                    </div>
                </div>
            </div>
        </div>
        <!--更改背景的块结束-->
        
         <!--聊天小块-->
    <div id="lk_cool_effects_chatDiv_zindex">
        <div id="lk_cool_effects_chatDiv">
            <div class="lk_cool_effects_chatDiv_left"></div>
            <div class="lk_cool_effects_chatDiv_right">
                <div class="lk_cool_effects_chatDiv_right_top"></div> 
                <div class="lk_cool_effects_chatDiv_right_down">></div>
            </div>
        </div>
        <div id="lk_cool_effects_chatDiv_list" uid="${sessionScope.userinfosession.uid}">
            <div id="lk_cool_effects_chatDiv_contents">
            	<div class="lk_cool_effects_chatDiv_contents_left">
                	<div class="lk_cool_effects_chatDiv_contents_left_find">
                    	<input type="text" placeholder="查找联系人" style="text-indent:10px;"/>
                    </div>
                    <div class="lk_cool_effects_chatDiv_contents_left_friendList">
                    	<ul>
						    <c:forEach items="${customerServicekey}" var="i" varStatus="n">
						    	<li cid="${i.cid}"><img 
							    	<c:if test="${i.cstatus==0}">
							    		 class="lk_cool_effects_chatDiv_contents_left_friendList_offline"
									</c:if>
								src="images${i.cimage}"/><span>${i.cnickname}</span><a>X</a></li>
						    </c:forEach>
						    
                        </ul>
                    </div>
                </div>
                <div class="lk_cool_effects_chatDiv_contents_right">
                	<div class="lk_cool_effects_chatDiv_contents_right_title"><span>嗨扑米客服</span></div>
                    <div class="lk_cool_effects_chatDiv_contents_right_message">
                    	<div class="lk_cool_effects_chatDiv_contents_right_message_none">
                        	<img src="images/lk_plaint.gif"/>
                            <p>请选择客服</p>
                        </div>
                        <div class="lk_cool_effects_chatDiv_contents_right_message_chat">
                        	
                        </div>
                    </div>
                </div>
            </div>
            <div class="lk_cool_effects_chatDiv_list_left">
                <div class="lk_cool_effects_chatDiv_list_left_input">
                	<input type="text" autofocus min=1 placeholder="请输入您的意见或建议..."/><input id="lk_cool_effects_chatDiv_ID" selfid="404" userid="1000" type="button" value="发送" style="width:50px;text-indent:0px" onclick="sendChatInfo(this)"/>
                </div>
            </div>
            <div class="lk_cool_effects_chatDiv_list_right"><</div>
        </div>
    </div>
    <!--聊天小块结束-->

            <div class="yhj_content" >

                <div class="yhj_content-logo"><!--查找任务的logo-->
                    <br><br>
                    <img src="images/yhj_10005.png"/>
                </div>
                <div class="yhj_content_maincontent">
                    <div class="yhj_content_maincontent_left">
                        <!--左边的导航栏，跟随屏幕滚动 ，需要把后面的元素预留好前面的位置-->
                        <!--分类-->
                        <br/><br/>
                        <div class="yhj_content_maincontent_left_line"></div>
                        <ul id="lk_content_maincontent_left_taskType">
                        	<li ttid="0" class="yhj_content_maincontent_left_select">全部</li>
                        	<c:forEach items="${applicationtasktype}" var="i">
                        		<li ttid="${i.ttid }">${i.ttname }</li>
                        	</c:forEach>
                        </ul>
                        <div class="yhj_content_maincontent_left_line"></div>
                    </div>
                    
                    <!--中间的内容块部分，高度根据内容块的个数而改变-->
                    <div class="yhj_content_maincontent_center">
                    
                    	<!-- 发布任务块-->
                        <div id="yhj_content_maincontent_center_quicksend" class="yhj_content_maincontent_center_quicksend" style="display:none">
                        	<form method="POST" id="lk_indexTaskForm" >
                        	<input type="hidden" name="op" value="indexTaskForm"/>
                        	<input type="hidden" id="lk_TaskTphoto" name="tphoto" value="model.jpg"/>
                            <img src="images/yhj_1441157309_143781.png" class="yhj_content_maincontent_center_quicksend_img" width="250" height="22"/>
                            <a href="#" id="yhj_content_maincontent_center_quicksend_news">
                                嗨扑米——帮你想帮~~隆重上线，注册有惊喜，积分换购~~！
                            </a>
                            <center>
                                <textarea style="text-indent:25px" maxlength="100"  id="tmore" name="tmore" placeholder="在这里填写对任务的描述,最多100个字哦!" type="text"  class="yhj_content_maincontent_center_quicksend_text"></textarea>
                            </center>
                            <ul class="yhj_content_maincontent_center_quicksend_ul1">
                                <li class="yhj_content_maincontent_center_quicksend_li1" id="lk_taskDateButton_click"  style="margin-top:1px;]margin-left:-15px;">期限</li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">
                                <input type="text" id="tdate" name="tdate" readonly required placeholder=" 请点击期限" style="margin-top:5px;width:130px;margin-left:-24px;border:none;border-bottom:1px solid #F00"/></li>
                                <li class="yhj_content_maincontent_center_quicksend_li1" id="lk_taskPhotoButton_click">图片</li>
								<input type="file" id="lk_taskPhotoButton" name="newfphoto" style="display:none"/>
                                <li class="yhj_content_maincontent_center_quicksend_li1" style="margin-left:-24px;">地点</li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">
                                <input type="text" id="taddr" name="taddr" style="margin-top:5px;width:70px;margin-left:-24px;border:none;border-bottom:1px solid #F00"/></li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">天气</li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">
                                <select id="tweather" name="tweather" style="margin-top:5px;width:60px;margin-left:-20px;margin-right:20px;">
                                	<option value="晴朗">晴朗</option>
                                    <option value="阴天">阴天</option>
                                    <option value="雨">雨</option>
                                </select></li>
                                <li class="yhj_content_maincontent_center_quicksend_li1" style="margin-left:-10px;">赏金</li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">
                                <input type="number" min="0" id="treward" name="treward" style="margin-top:5px;width:50px;margin-left:-24px;"/>
                                </li>
                                <li class="yhj_content_maincontent_center_quicksend_power">公开<span class="yhj_head_info_ul_li_down"></span></li>
                                
                                
                                <li class="yhj_content_maincontent_center_quicksend_li1" style="margin-left:-15px;">类型:</li>
                                <li class="yhj_content_maincontent_center_quicksend_li1">
                                	<select id="ttid" name="ttid" style="margin-top:5px;width:60px;margin-left:-15px;">
                                		<c:forEach items="${applicationtasktype}" var="i">
			                        		<option value="${i.ttid }">${i.ttname }</option>
			                        	</c:forEach>
                                	</select>
								</li>
                           </ul>
                            <input type="button" id="yhj_content_maincontent_center_quicksend_submit" value="发表"/>
                            </form>
                        </div>
                        <div id="lk_content_maincontent_selectDate">
                        	<iframe src="calendar/selectdate.html" style="height:100%;width:100%" scrolling="no" frameborder="0" ></iframe>
                        </div>
                        <div id="lk_content_maincontent_ImagePreview">
                        	<dl>
                        		<dt><h3>&nbsp;&nbsp;图片预览区域<span id="lk_content_maincontent_ImagePreview_close">X</span></h3></dt>
                        		<dd><div id="lk_taskPhotodiv"><img id="lk_taskPhoto" class="lk_content_maincontent_ImagePreview_img" width="140" height="100" alt="请选择上传图片" /></div></dd>
                        	</dl>
                        </div>
                        
                        <div class="yhj_content_maincontent_center_smallcontent">
                            <ul id="lk_content_maincontent_center_timeLimit">
                            	<li limit="0" class="yhj_content_maincontent_center_smallcontent_select">全部</li>
                                <li limit="1">1小时</li>
                                <li limit="24">24小时</li>
                                <li limit="168">周热榜</li>
                            </ul>
                            <span id="yhj_head_info_ul_li_up"></span>
                        </div>
                        <div class="yhj_content_maincontent_center_normalcontent">
                        	<div id="monitor-window"><span id="newTaskCount" count="0" onclick="taskCountChange()">0 条新任务动态</span></div>  
                        </div>
                        <div id="lk_preview_img_big">
                            <!--显示预览图的块-->
                            <img src=""/>
                        </div>
                        
                     <!--任务块-->   
                     <div id="lk_task_list_show">
                    </div>
                    
                    <div class="yhj_content_maincontent_center_normalcontent" id="lk_task_list_show_refreshTip">
		            	<center><h1>正在拼命查询中...请等待...</h1></center>
		            </div>
                    </div>
                    
                    <div class="yhj_content_maincontent_right">
                        <!--个人信息板块 可display none-->	
                        <div class="yhj_content_maincontent_right_userinfo" id="yhj_content_maincontent_right_userinfo" >

                            <div id="yhj_content_maincontent_right_userinfo_headID" class="yhj_content_maincontent_right_userinfo_head" >

                                <center>
                                    <img id="currentUserPhoto" photo="${sessionScope.userinfosession.uimage}" class="yhj_content_maincontent_right_userinfo_headimg"  width="100" height="100" onClick="javascript:location.href='backcust/personinfo.jsp'">
                                    <!--点击进入用户个人管理-->
                                </center>
                            </div>
                          <div class="yhj_content_maincontent_right_userinfo_content">
                                <!-- 头像 关注人数 帮助次数  求助次数-->
                                <h2 class="yhj_content_maincontent_right_userinfo_content_name">
                                    <center>
                                        <div id="currentUser">${sessionScope.userinfosession.ualais}</div><img/><img/>
                                    </center>
                                </h2>
                                <ul>
                                    <li id="yhj_content_maincontent_right_userinfo_content_guanzhu"><a href="#">${sessionScope.userinfosession.ulike}</a><br>关注</li>
                                    <li id="yhj_content_maincontent_right_userinfo_content_bangzhu"><a href="#">${sessionScope.userinfosession.acceptcount}</a><br>帮助</li>
                                    <li id="yhj_content_maincontent_right_userinfo_content_qiuzhu"><a href="#">${sessionScope.userinfosession.issuecount}</a><br>求助</li>
                                </ul>
                            </div>
                        </div>
                        
                        <div class="yhj_content_maincontent_right_content">
                            <h3 class="yhj_content_maincontent_right_content_title">今日榜单</h3>
                            <div>
                                <ul class="yhj_content_maincontent_right_content_charts">
                                    <li>关注度</li>
                                    <li>积分数</li>
                                </ul>	
                                <div class="yhj_content_maincontent_right_content_charts_content" >
                                    <ul>
                                    	<c:forEach items="${applicationrank}" var="i" varStatus="n">
                                    		<c:if test="${n.count==6}">
                                    			<li><img src="images/yhj_number1.png" width="41"/><a href='task.action?op=taskdetail&tid=${i.key}'>${i.key}</a><span>关注数:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==7}">
                                    			<li><img src="images/yhj_number2.png" width="36"/><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>关注数:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==8}">
                                    			<li><img src="images/yhj_number3.png" width="31"/><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>关注数:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==9 || n.count==10}"> 
											    <li><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>关注数:${i.value}</span></li>
											</c:if>
										</c:forEach>
                                    </ul>
                                </div>
                                <div class="yhj_content_maincontent_right_content_charts_content" style="display:none;">
                                    <ul>
                                    	<c:forEach items="${applicationrank}" var="i" varStatus="n">
                                    		<c:if test="${n.count==1}">
                                    			<li><img src="images/yhj_number1.png" width="41"/><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>积分:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==2}">
                                    			<li><img src="images/yhj_number2.png" width="36"/><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>积分:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==3}">
                                    			<li><img src="images/yhj_number3.png" width="31"/><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>积分:${i.value}</span></li>
											</c:if>
											<c:if test="${n.count==4 || n.count==5}"> 
											    <li><a href="task.action?op=taskdetail&tid=${i.key}">${i.key}</a><span>积分:${i.value}</span></li>
											</c:if>
										</c:forEach>
                                    </ul>
                                </div>
                            </div>
                            <a class="yhj_content_maincontent_right_content_slide"></a>
                            <!--<a class="yhj_content_maincontent_right_content_close"></a>-->
                        </div>
                        
                        <div class="yhj_content_maincontent_right_content" style="display:none">
                            <h3 class="yhj_content_maincontent_right_content_title">我关心的人</h3>
                            <div  style="display:none">
                                <div class="yhj_content_maincontent_right_content_friendinfo">
                                    <div class="yhj_content_maincontent_right_content_headlist_head_img">
                                        <img src="images/yhj_10003.jpg" width="60" height="60"/>
                                    </div>
                                    <p class="yhj_content_maincontent_right_content_headlist_head_name">asdf</p><br>
                                    <a class="yhj_content_maincontent_right_content_friendinfo_details" href="#">[详情]</a>
                                    <!--这两个a标签都是在点击的时候，跳转到好友的主页-->
                                    <a class="yhj_content_maincontent_right_content_headlist_head_content" href="#">
                                        问饿哦日问饿哦日傲让我扔问饿哦日
                                    </a>
                                </div>
                                <ul class="yhj_changepage"><!--后期要制作出一个方法来创建pagechange，页数是计算出来的-->
                                    <li>1</li>
                                    <li>2</li>
                                    <li>3</li>
                                </ul>
                            </div>
                            <a class="yhj_content_maincontent_right_content_slide"></a>
                        </div>
                        <div class="yhj_content_maincontent_right_content">
                            <h3 class="yhj_content_maincontent_right_content_title" style="display:none">我关注的任务</h3>
                            <div style="display:none" class="yhj_content_maincontent_right_content_tasklist" style="margin-bottom:7px;">
                                <ul class="yhj_content_maincontent_right_content_tasklist_ul">
                                    <li>暂无关注的任务</li><!--没有关注时的内容-->
                                    <li><a class="yhj_content_maincontent_right_content_tasklist_title" href="#">任务名称</a><span class="yhj_content_maincontent_right_content_tasklist_taskinfo">发布人+时间</span></li>
                                    <li><a class="yhj_content_maincontent_right_content_tasklist_title" href="#">任务名称</a><span class="yhj_content_maincontent_right_content_tasklist_taskinfo">发布人+时间</span></li>
                                    <li><a class="yhj_content_maincontent_right_content_tasklist_title" href="#">任务名称</a><span class="yhj_content_maincontent_right_content_tasklist_taskinfo">发布人+时间</span></li>
                                    <li><a class="yhj_content_maincontent_right_content_tasklist_title" href="#">任务名称</a><span class="yhj_content_maincontent_right_content_tasklist_taskinfo">发布人+时间</span></li>
                                </ul>
                                <ul class="yhj_changepage"><!--后期要制作出一个方法来创建pagechange，页数是计算出来的-->
                                    <li>1</li>
                                    <li>2</li>
                                    <li>3</li>
                                </ul>
                            </div>    
                            <a class="yhj_content_maincontent_right_content_slide"></a>
                        </div>
                        
                        <div class="yhj_content_maincontent_right_content" >
                            <h3 class="yhj_content_maincontent_right_content_title" style="display:none">附近的人</h3>
                            <div style="display:none" class="yhj_content_maincontent_right_content_headlist">
                                <div class="yhj_content_maincontent_right_content_headlist_head">
                                    <div class="yhj_content_maincontent_right_content_headlist_head_img">
                                        <img src="images/yhj_10003.jpg" width="60" height="60"/>
                                    </div>
                                    <p class="yhj_content_maincontent_right_content_headlist_head_name">asdf</p>
                                    <img/><img/>
                                </div>
                            </div>
                            <a href="#" class="yhj_content_maincontent_right_content_change"><img src="images/yhj_refresh-blue.png" width="20" height="20"/><br>换<br>一<br>批</a>
                            <a class="yhj_content_maincontent_right_content_slide"></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 中间内容结束-->
        
        <!--foot内容开始 -->
        <iframe class="yhj_foot" src="foot.html"></iframe>
        <!--foot内容结束-->
        
        <!--  Totop按钮-->
        <div class="yhj_totop">
            <img src="images/yhj_right39.png" width="40" height="40"/>
        </div>
        <!--按钮结束-->
	</div>
    <div class="yhj_messagebox_quicksend">
        <div class="yhj_content_maincontent_center_quicksend" style="top:230px;left:-69px;">
              <img src="images/yhj_1441157309_143781.png" class="yhj_content_maincontent_center_quicksend_img" width="250" height="22"/>
              <a href="#" id="yhj_content_maincontent_center_quicksend_news">
                   嗨扑米——帮你想帮~~隆重上线，注册有惊喜，积分换购~~！
              </a>
              <center>
                   <textarea type="text" placeholder="按下“n”键可以快速发布任务信息哦~！"class="yhj_content_maincontent_center_quicksend_text"></textarea>
              </center>
              <ul class="yhj_content_maincontent_center_quicksend_ul1">
                 <li class="yhj_content_maincontent_center_quicksend_li1">表情
                     <div class="yhj_content_maincontent_center_quicksend_smile">
                                    
                     </div>
                 </li>
                 <li class="yhj_content_maincontent_center_quicksend_li1">图片</li>
                 <li class="yhj_content_maincontent_center_quicksend_li1">视频</li>
                 <li class="yhj_content_maincontent_center_quicksend_li1">求助信</li>
                 <li class="yhj_content_maincontent_center_quicksend_li1">积分</li>
                 <li class="yhj_content_maincontent_center_quicksend_power">公开<span class="yhj_head_info_ul_li_down"></span></li>
              </ul>
              <input type="button" id="yhj_content_maincontent_center_quicksend_submit" value="发表"/>
        </div> 
        <div class="yhj_content_maincontent_center_quicksend_close">
              <h2>取消</h2>
        </div>
   	</div>
    
    <script type="text/javascript">

	    
	    function changeskin(a){
			if(!a){
				$(".yhj_content").eq(0).css({"background":"url('images/background/jd_bg4.jpg') \cover no-repeat rgb(230,235,65)","background-size":"cover"});
			}else if(a){
				$(".yhj_content").eq(0).css({"background":"url('images/background/${sessionScope.userinfosession.simage}') no-repeat ${sessionScope.userinfosession.scolor}","background-size":"cover"});
			}
		}
	    changeskin(flag);
    
	  	
	    
	    
	    if(""=="${sessionScope.userinfosession.ulogon}"||"undefinde"=="${sessionScope.userinfosession.ulogon}"){//利用账户的账号，判断是否有用户登录

			//没有用户登录
			$(".yhj_content_maincontent_right_userinfo").slideUp("fast");
	    	$(".yhj_content_maincontent_center_quicksend").slideUp("fast");
	    	$("#currentUserPhoto").attr("src","images/mixedPicData/0001.jpg");
			
		}else{
			$(".yhj_content_maincontent_right_userinfo").slideDown("fast");
			$("#lk_select_buttom").slideDown("fast");
			$(".yhj_content_maincontent_center_quicksend").slideDown("fast");
			$("#currentUserPhoto").attr("src","images/mixedPicData/${sessionScope.userinfosession.uimage}");
			$("#lk_select_buttom").slideDown("fast");
		}
	    
	    $(window).keyup(function(event){//快速发出任务   接下来承接界面上发出任务的逻辑
			if(event.keyCode==78){
				$(".yhj_messagebox_quicksend").fadeIn("fast");
				$(".yhj_messagebox_quicksend .yhj_content_maincontent_center_quicksend_text").select();
			}else if(event.keyCode==27){
				$(".yhj_messagebox_quicksend").fadeOut("fast");
			}
		});
    
	    function register(){
	    	var ulogon=$("#yhj_userrigister_uname").val();
	    	var upwd=$("#yhj_userrigister_pwd").val();
	    	if(upwd!=""){
		    	if(CheckMail(ulogon)){
		    		//邮箱验证成功
		    		$.ajax({
		    			url:"cust.action?op=register",
		    			type:"POST",
		    			data:{ulogon:$("#yhj_userrigister_uname").val(),upwd:$("#yhj_userrigister_pwd").val(),localhref:URLencode(location.href)},
		    			dataType:"JSON",
		    			success:function(data){
		    				if(data.code==1){
		    					swal("用户注册成功!", "已经发送邮箱至"+ulogon+"，请注意查收，以便激活和使用...", "success");
		    				}else if(data.code==0){
		    					swal("用户未激活!",data.msg);
		    				}
		    			}
		    		});
		    		
		    	}else{
		    		swal("请填写正确的邮箱...");
		    	}
	    	}else{
	    		swal("用户密码不能为空...");
	    	}
	    }
	    
	    function URLencode(sStr){
	        return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
	    }
	    
	    function CheckMail(mail) {
	    	 var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	    	 if (filter.test(mail)) {
	    		 return true;
	    	 }else {
		    	 return false;
	    	 }
	    }
	    
	    function taskCountChange(){//查看刚刚发布的任务
	    	//获取新的数量
	    	var newTaskCount=parseInt( $("#newTaskCount").attr("count") );
	    	if(newTaskCount>0 ){
	    		$("#newTaskCount").text("0 条新任务动态");
	    		$("#newTaskCount").attr("count","0");
	    		lk_indexFindTask("0","0","0","0");//Ajax查询新任务
	    	}else{
	    		swal({
	    			  title: "暂时没有新任务动态,请等等吧..",
	    			  text: "对话框1秒后自动关闭.",
	    			  timer: 1000
	    			});
	    	}
	    }
	    
	    var yhj_sid;
	    $("#lk_select_bgDiv_down_buttom_1").bind("click",function(){//确定按钮
	    	var yhj_skinlist=$(".lk_select_bgDiv_down_smallBg_img");
	    	
	    	for(var i=0;i<yhj_skinlist.length;i++){
	    		if($(yhj_skinlist[i]).css("border")==" 2px solid rgb(255, 153, 51)"){
	    			yhj_sid=$(yhj_skinlist[i]).attr("yhj_sid");
	    			
	    		}
	    		
	    	}
			lk_body_bg1="background:url("+lk_body_bg2+") no-repeat;background-size:contain";//拼接背景格式
			$(".yhj_content_maincontent_right_userinfo_head").css({"background":"url("+lk_body_bg2+") no-repeat #1C0E00","background-size":"cover"});
			$.ajax({
				type:"POST",
				url:"cust.action?op=changebackground",
				data:{"uid":"${sessionScope.userinfosession.uid}","sid":yhj_sid},
				dataType:"JSON",
				success:function(data){
					if(data.code==1){
						swal({   title: "",   text: "背景已经成功修改",   timer:1000 });
					}
				}
			});
		});
	    
	    $(".lk_select_bgDiv_down_smallBg_img").bind({//小图片事件
			click:function(){
				yhj_sid=$(this).attr("yhj_sid");
				lk_body_bg2=$(this).children("img").attr("src");//图片路径
				$(".yhj_content").attr("style","background:url("+lk_body_bg2+") no-repeat;background-size:cover");//预览
				$(".yhj_content_maincontent_right_userinfo_head").css({"background":"url("+lk_body_bg2+") no-repeat #1C0E00","background-size":"cover"});
			}
		});
	    
	    //解决url的错误
	    //设置背景图片,因为session可能为空,所以因为是用url插入,所以需要先判断,否则后台会报错
	    $(function(){
	    	var simage="${sessionScope.userinfosession.simage}";
	    	var scolor="${sessionScope.userinfosession.scolor}";
	    	if(simage!="" && scolor!=null){
	    		var style="background:url('images/background/"+simage+"') no-repeat "+scolor+";background-size:auto;"
	    		$("#yhj_content_maincontent_right_userinfo_headID").attr("style",style);
	    	}
	    });
    </script>
  </body>
</html>
